<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020\8\28 0028
 * Time: 10:35
 */

$memcache =new Memcache();
$host='127.0.0.1';
$port="11211";
$memcache->connect($host,$port);
ini_set('session.save_handler', 'memcache');
ini_set('session.save_path', 'http://127.0.0.1:11211');
session_start();

$seesion_id=session_id();
var_dump($seesion_id);
$_SESSION['name']='test';
$_SESSION['user_id']=1;
$res=$memcache->get("$seesion_id");
var_dump($res);
